def add_range(n, step=1):
    result = 0
    for i in range(1, n+1, step):
        result = result + i
    return result
